﻿<Window x:Class="for7raid.vkPlayer.EditItem"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Редактировать запись" SizeToContent="Height" Width="500" 
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:my="clr-namespace:for7raid.vkPlayer"
        Style="{StaticResource CustomWindowChrome}"
        ResizeMode="NoResize"
         TextOptions.TextFormattingMode="Display" >

    <Grid >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Label Content="Исполнитель" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="0"  HorizontalAlignment="Stretch" Margin="3" Text="{Binding Path=Item.Artist, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center"  />
       
        <Label Content="Название" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="3" Text="{Binding Path=Item.Title, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />

        <Label Content="MP3 Tag Info" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right" Margin="3,1" VerticalAlignment="Center" />
        <Separator Grid.Column="1" Grid.Row="2" Margin="3,1" HorizontalAlignment="Stretch" BorderBrush="Gray" BorderThickness="1"/>

        <Label Content="Исполнитель" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3,0.5" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="3"  HorizontalAlignment="Stretch" Margin="3,0.5" Text="{Binding Path=Item.tagArtist}" IsReadOnly="True" VerticalAlignment="Center"  />
        <Label Content="Название" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Left" Margin="3,0.5" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="4"  HorizontalAlignment="Stretch" Margin="3,0.5" Text="{Binding Path=Item.tagTitle}" IsReadOnly="True" VerticalAlignment="Center"  />
        <Label Content="Альбом" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Margin="3,0.5" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="5"  HorizontalAlignment="Stretch" Margin="3,0.5" Text="{Binding Path=Item.tagAlbum}" IsReadOnly="True" VerticalAlignment="Center"  />
        <Label Content="Жанр" Grid.Column="0" Grid.Row="6" HorizontalAlignment="Left" Margin="3,0.5" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="6"  HorizontalAlignment="Stretch" Margin="3,0.5" Text="{Binding Path=Item.tagGenre}" IsReadOnly="True" VerticalAlignment="Center"  />
        <Label Content="Год" Grid.Column="0" Grid.Row="7" HorizontalAlignment="Left" Margin="3,0.5" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="7"  HorizontalAlignment="Stretch" Margin="3,0.5" Text="{Binding Path=Item.tagYear}" IsReadOnly="True" VerticalAlignment="Center"  />
        <Label Content="Комментарий" Grid.Column="0" Grid.Row="8" HorizontalAlignment="Left" Margin="3,0.5" VerticalAlignment="Center" />
        <TextBox Grid.Column="1" Grid.Row="8"  HorizontalAlignment="Stretch" Margin="3,0.5" Text="{Binding Path=Item.tagComment}" IsReadOnly="True" VerticalAlignment="Center"  />


        <Expander Grid.Row="9" Grid.ColumnSpan="2" Header="Дополнительно" Margin="3">
            <!--<Expander.Style>
                <Style TargetType="Expander">
                    <Setter Property="Visibility" Value="Visible"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=Item.Text}" Value="">
                            <Setter Property="Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Expander.Style>-->
            <Grid >
                
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                
                <TextBlock Text="Текст песни" Margin="3"/>
                <TextBox AcceptsReturn="True" Text="{Binding Item.Text}" 
                         Grid.Row="2" Grid.ColumnSpan="2" Height="300" 
                         TextWrapping="WrapWithOverflow"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"/>
            </Grid>
        </Expander>

        <WrapPanel Grid.Row="10" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal">
           
            <Button Width="70" Margin="10" IsCancel="True">Отменить</Button>
            <Button Width="70" Margin="10" IsDefault="True" Foreground="Green" Command="Save" CommandTarget="{Binding}">OK</Button>
        </WrapPanel>
    </Grid>
</Window>
